<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="深度学习和机器学习有什么区别？, Hexo">
    <meta name="description" content="深度学习和机器学习有什么区别？作者：蜗牛学苑链接：https://www.zhihu.com/question/41268372/answer/575987499来源：知乎著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="referrer" content="no-referrer-when-downgrade">
    <!-- Global site tag (gtag.js) - Google Analytics -->


    <title>深度学习和机器学习有什么区别？ | Hexo</title>
    <link rel="icon" type="image/jpeg" href="/zuozhu.jpg">

    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/all.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">

    <script src="/libs/jquery/jquery-3.6.0.min.js"></script>

<meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css"></head>



   <style>
    body{
       background-image: url(https://cdn.jsdelivr.net/gh/Tokisaki-Galaxy/res/site/medias/background.jpg);
       background-repeat:no-repeat;
       background-size: 100% 100%;
       background-attachment:fixed;
    }
</style>



<body>
    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/zuozhu.jpg" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">Hexo</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>标签</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/categories" class="waves-effect waves-light">
      
      <i class="fas fa-bookmark" style="zoom: 0.6;"></i>
      
      <span>分类</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/archives" class="waves-effect waves-light">
      
      <i class="fas fa-archive" style="zoom: 0.6;"></i>
      
      <span>归档</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/about" class="waves-effect waves-light">
      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/contact" class="waves-effect waves-light">
      
      <i class="fas fa-comments" style="zoom: 0.6;"></i>
      
      <span>留言板</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/friends" class="waves-effect waves-light">
      
      <i class="fas fa-address-book" style="zoom: 0.6;"></i>
      
      <span>友情链接</span>
    </a>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>


<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/zuozhu.jpg" class="logo-img circle responsive-img">
        
        <div class="logo-name">Hexo</div>
        <div class="logo-desc">
            
            if you want it, go get it
            
        </div>
    </div>

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			标签
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/categories" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-bookmark"></i>
			
			分类
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/archives" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-archive"></i>
			
			归档
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/about" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-user-circle"></i>
			
			关于
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/contact" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-comments"></i>
			
			留言板
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/friends" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-address-book"></i>
			
			友情链接
		</a>
          
        </li>
        
        
        <li><div class="divider"></div></li>
        <li>
            <a href="https://github.com/blinkfox/hexo-theme-matery" class="waves-effect waves-light" target="_blank">
                <i class="fab fa-github-square fa-fw"></i>Fork Me
            </a>
        </li>
        
    </ul>
</div>


        </div>

        
            <style>
    .nav-transparent .github-corner {
        display: none !important;
    }

    .github-corner {
        position: absolute;
        z-index: 10;
        top: 0;
        right: 0;
        border: 0;
        transform: scale(1.1);
    }

    .github-corner svg {
        color: #0f9d58;
        fill: #fff;
        height: 64px;
        width: 64px;
    }

    .github-corner:hover .octo-arm {
        animation: a 0.56s ease-in-out;
    }

    .github-corner .octo-arm {
        animation: none;
    }

    @keyframes a {
        0%,
        to {
            transform: rotate(0);
        }
        20%,
        60% {
            transform: rotate(-25deg);
        }
        40%,
        80% {
            transform: rotate(10deg);
        }
    }
</style>

<a href="https://github.com/blinkfox/hexo-theme-matery" class="github-corner tooltipped hide-on-med-and-down" target="_blank"
   data-tooltip="Fork Me" data-position="left" data-delay="50">
    <svg viewBox="0 0 250 250" aria-hidden="true">
        <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
        <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
              fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
        <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
              fill="currentColor" class="octo-body"></path>
    </svg>
</a>
        
    </nav>

</header>

    
<script src="/libs/cryptojs/crypto-js.min.js"></script>
<script>
    (function() {
        let pwd = '';
        if (pwd && pwd.length > 0) {
            if (pwd !== CryptoJS.SHA256(prompt('请输入访问本文章的密码')).toString(CryptoJS.enc.Hex)) {
                alert('密码错误，将返回主页！');
                location.href = '/';
            }
        }
    })();
</script>




<div class="bg-cover pd-header post-cover" style="background-image: url('/medias/featureimages/14.jpg')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <h1 class="description center-align post-title">深度学习和机器学习有什么区别？</h1>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="/libs/tocbot/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        width: 345px;
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        padding: 35px 0 15px 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content {
        padding-bottom: 30px;
        overflow: auto;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;

        position: absolute;
        right: 23.5vw;
        display: block;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0/">
                                <span class="chip bg-color">深度学习</span>
                            </a>
                        
                            <a href="/tags/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/">
                                <span class="chip bg-color">机器学习</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" class="post-category">
                                人工智能
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2021-12-09
                </div>
                

                

                

                

                
            </div>
        </div>
        <hr class="clearfix">

        

        

        <div class="card-content article-card-content">
            <div id="articleContent">
                <h1 id="深度学习和机器学习有什么区别？"><a href="#深度学习和机器学习有什么区别？" class="headerlink" title="深度学习和机器学习有什么区别？"></a>深度学习和机器学习有什么区别？</h1><p>作者：蜗牛学苑<br>链接：<a target="_blank" rel="noopener" href="https://www.zhihu.com/question/41268372/answer/575987499">https://www.zhihu.com/question/41268372/answer/575987499</a><br>来源：知乎<br>著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。</p>
<p>器学习和深度学习变得越来越火。突然之间，不管是了解的还是不了解的，所有人都在谈论机器学习和深度学习。无论你是否主动关注过数据科学，你应该已经听说过这两个名词了。 </p>
<p>为了展示他们的火热程度，我在 Google trend 上搜索了这些关键字： </p>
<p><img src="/.io//v2-32cdf54f6615a20610a504d779b21f09_720w.jpg" alt="img"><img src="/.io//v2-32cdf54f6615a20610a504d779b21f09_720w.jpg" alt="img"></p>
<p>如果你想让自己弄清楚机器学习和深度学习的区别，请阅读本篇文章，我将用通俗易懂的语言为你介绍他们之间的差别。下文详细解释了机器学习和深度学习中的术语。并且，我比较了他们两者的不同，别说明了他们各自的使用场景。 </p>
<h2 id="什么是机器学习？"><a href="#什么是机器学习？" class="headerlink" title="什么是机器学习？"></a><strong>什么是机器学习？</strong></h2><p>一言以蔽之，由 Tom Mitchell 给出的被广泛引用的机器学习的定义给出了最佳解释。下面是其中的内容： </p>
<p>“计算机程序可以在给定某种类别的任务 T 和性能度量 P 下学习经验 E ，如果其在任务 T 中的性能恰好可以用 P 度量，则随着经验 E 而提高。”     </p>
<p>是不是读起来很绕口呢？</p>
<p>让我们用简单的例子来分解下这个描述。 </p>
<p>示例 1：机器学习和根据人的身高估算体重</p>
<p>假设你想创建一个能够根据人的身高估算体重的系统（也许你出自某些理由对这件事情感兴趣）。那么你可以使用机器学习去找出任何可能的错误和数据捕获中的错误，首先你需要收集一些数据，让我们来看看你的数据是什么样子的：</p>
<p><img src="https://pic1.zhimg.com/50/v2-b6d666ebb7bcedb48a38c544323685fd_720w.jpg?source=1940ef5c" alt="img"><img src="/.io//v2-b6d666ebb7bcedb48a38c544323685fd_720w.jpg" alt="img"></p>
<p>图中的每一个点对应一个数据，我们可以画出一条简单的斜线来预测基于身高的体重<br>例如这条斜线：</p>
<p>Weight (in kg) = Height (in cm) - 100</p>
<p>这些斜线能帮助我们作出预测，尽管这些斜线表现得很棒，但是我们需要理解它是怎么表现的，我们希望去减少预测和实际之间的误差，这也是衡量其性能的方法。</p>
<p>深远一点地说，我们收集更多的数据 (experience)，模型就会变得更好。我们也可以通过添加更多变量（例如性别）和添加不同的预测斜线来完善我们的模型。</p>
<p>示例2：飓风预测系统</p>
<p>我们找一个复杂一点的例子。假如你要构建一个<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/04/comparison-between-deep-learning-machine-learning/?utm_source=dzone&utm_medium=social">飓风预测系统</a>。假设你手里有所有以前发生过的飓风的数据和这次飓风产生前三个月的天气信息。</p>
<p>如果要手动构建一个飓风预测系统，我们应该怎么做？</p>
<p><img src="/.io//v2-b738b75ea40653da00f4782f72e9d897_720w.jpg" alt="img"><img src="/.io//v2-b738b75ea40653da00f4782f72e9d897_720w.jpg" alt="img"></p>
<p>首先我们的任务是清洗所有的数据找到数据里面的模式进而查找产生飓风的条件。</p>
<p>我们既可以将模型条件数据(例如气温高于40度，湿度在80-100等)输入到我们的系统里面生成输出；也可以让我们的系统自己通过这些条件数据产生合适的输出。</p>
<p>我们可以把所有以前的数据输入到系统里面来预测未来是否会有飓风。基于我们系统条件的取值，评估系统的性能(系统正确预测飓风的次数)。我们可以将系统预测结果作为反馈继续多次迭代以上步骤。</p>
<p>让我们根据前边的解释来定义我们的预测系统：我们的任务是确定可能产生飓风的气象条件。性能P是在系统所有给定的条件下有多少次正确预测飓风。经验E是我们的系统的迭代次数。</p>
<h2 id="什么是深度学习"><a href="#什么是深度学习" class="headerlink" title="什么是深度学习?"></a><strong>什么是深度学习?</strong></h2><p>深度学习的概念并不新颖。它已经存在好几年了。但伴随着现有的所有的炒作，深度的学习越来越受到重视。正如我们在机器学习中所做的那样，先来看看深度学习的<a href="https://link.zhihu.com/?target=http://www.deeplearningbook.org/">官方定义</a>，然后用一个例子来解释。 </p>
<p>“深度学习是一种特殊的机器学习，通过学习将世界使用嵌套的概念层次来表示并实现巨大的功能和灵活性，其中每个概念都定义为与简单概念相关联，而更为抽象的表示则以较不抽象的方式来计算。”     </p>
<p>这也有点让人混乱。下面使用一个简单示例来分解下此概念。 </p>
<p>示例 1：形状检测</p>
<p>先从一个简单的例子开始，从概念层面上解释究竟发生了什么的事情。我们来试试看如何从其他形状中识别的正方形。</p>
<p><img src="/.io//v2-bb5d66a99566765840654627d6852082_720w.jpg" alt="img"><img src="/.io//v2-bb5d66a99566765840654627d6852082_720w.jpg" alt="img"></p>
<p>我们眼中的第一件事是检查图中是否有四条的线（简单的概念）。如果我们找到这样的四条线，我们进一步检查它们是相连的、闭合的和相互垂直的，并且它们是否是相等的（嵌套的概念层次结构）。</p>
<p>所以，我们完成了一个复杂的任务（识别一个正方形），并以简单、不太抽象的任务来完成它。深度学习本质上在大规模执行类似逻辑。</p>
<p>示例 2：猫VS狗</p>
<p>我们举一个动物辨识的例子，其中我们的系统必须识别给定的图像中的动物是猫还是狗。<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/04/comparison-between-deep-learning-machine-learning/?utm_source=dzone&utm_medium=social">阅读下此文，</a>以了解深度学习在解决此类问题上如何比机器学习领先一步。</p>
<h2 id="机器学习和深度学习的对比"><a href="#机器学习和深度学习的对比" class="headerlink" title="机器学习和深度学习的对比"></a><strong>机器学习和深度学习的对比</strong></h2><p>现在的你应该已经对机器学习和深度学习有所了解，接下来我们将会学习其中一些重点，并比较两种技术。</p>
<p><strong>数据依赖性</strong></p>
<p>深度学习与传统的机器学习最主要的区别在于随着数据规模的增加其性能也不断增长。当数据很少时，深度学习算法的性能并不好。这是因为深度学习算法需要大量的数据来完美地理解它。另一方面，在这种情况下，传统的机器学习算法使用制定的规则，性能会比较好。下图总结了这一事实。</p>
<p><img src="/.io//v2-e0236cbc0c5ed0b4a417fccf81c4c50c_720w.jpg" alt="img"><img src="/.io//v2-e0236cbc0c5ed0b4a417fccf81c4c50c_720w.jpg" alt="img"></p>
<p><strong>硬件依赖</strong></p>
<p>深度学习算法需要进行大量的矩阵运算，GPU 主要用来高效优化矩阵运算，所以 GPU 是深度学习正常工作的必须硬件。与传统机器学习算法相比，深度学习更依赖安装 GPU 的高端机器。</p>
<p><strong>特征处理</strong></p>
<p><a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/04/feature-engineering-in-iot-age-how-to-deal-with-iot-data-and-create-features-for-machine-learning/?utm_source=dzone&utm_medium=social">特征处理</a>是将领域知识放入特征提取器里面来减少数据的复杂度并生成使学习算法工作的更好的模式的过程。特征处理过程很耗时而且需要专业知识。</p>
<p>在机器学习中，大多数应用的特征都需要专家确定然后编码为一种数据类型。</p>
<p>特征可以使像素值、形状、纹理、位置和方向。大多数机器学习算法的性能依赖于所提取的特征的准确度。</p>
<p>深度学习尝试从数据中直接获取高等级的特征，这是深度学习与传统机器学习算法的主要的不同。基于此，深度学习削减了对每一个问题设计特征提取器的工作。例如，<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/06/architecture-of-convolutional-neural-networks-simplified-demystified/?utm_source=dzone&utm_medium=social">卷积神经网络</a>尝试在前边的层学习低等级的特征(边界，线条)，然后学习部分人脸，然后是高级的人脸的描述。更多信息可以阅读<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/06/architecture-of-convolutional-neural-networks-simplified-demystified/?utm_source=dzone&utm_medium=social">神经网络机器在深度学习里面的有趣应用</a>。</p>
<p><img src="/.io//v2-74b4286a630c0f8dfc3a09f1725006b4_720w.jpg" alt="img"><img src="/.io//v2-74b4286a630c0f8dfc3a09f1725006b4_720w.jpg" alt="img"></p>
<p><strong>问题解决方式</strong></p>
<p>当应用传统机器学习算法解决问题的时候，传统机器学习通常会将问题分解为多个子问题并逐个子问题解决最后结合所有子问题的结果获得最终结果。相反，深度学习提倡直接的端到端的解决问题。</p>
<p>举例说明：</p>
<p>假设有一个<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/08/finding-chairs-deep-learning-part-i/?utm_source=dzone&utm_medium=social">多物体检测</a>的任务需要图像中的物体的类型和各物体在图像中的位置。</p>
<p><img src="https://pic3.zhimg.com/50/v2-1f09714e399214bed764b5c604a7dd18_720w.jpg?source=1940ef5c" alt="img"><img src="/.io//v2-1f09714e399214bed764b5c604a7dd18_720w.jpg" alt="img"></p>
<p>传统机器学会将问题分解为两步：物体检测和物体识别。首先，使用一个边界框检测算法扫描整张图片找到可能的是物体的区域；然后使用物体识别算法(例如 SVM 结合 HOG )对上一步检测出来的物体进行识别。</p>
<p>相反，深度学习会直接将输入数据进行运算得到输出结果。例如可以直接将图片传给 <a href="https://link.zhihu.com/?target=https://pjreddie.com/darknet/yolo/">YOLO 网络</a>(一种深度学习算法)，YOLO 网络会给出图片中的物体和名称。</p>
<p><strong>执行时间</strong></p>
<p>通常情况下，训练一个深度学习算法需要很长的时间。这是因为深度学习算法中参数很多，因此训练算法需要消耗更长的时间。最先进的<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/06/getting-started-with-deep-learning-using-keras-in-r/?utm_source=dzone&utm_medium=social">深度学习算法 ResNet</a>完整地训练一次需要消耗两周的时间，而机器学习的训练会消耗的时间相对较少，只需要几秒钟到几小时的时间。</p>
<p>但两者测试的时间上是完全相反。深度学习算法在测试时只需要很少的时间去运行。如果跟 <a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2015/08/learning-concept-knn-algorithms-programming/?utm_source=dzone&utm_medium=social">k-nearest neighbors</a>（一种机器学习算法）相比较，测试时间会随着数据量的提升而增加。不过这不适用于所有的机器学习算法，因为有些机器学习算法的测试时间也很短。</p>
<p><strong>可解释性</strong></p>
<p>至关重要的一点，我们把可解释性作为比较机器学习和深度学习的一个因素。</p>
<p>我们看个例子。假设我们适用深度学习去自动为文章评分。深度学习可以达到接近人的标准，这是相当惊人的性能表现。但是这仍然有个问题。深度学习算法不会告诉你为什么它会给出这个分数。当然，在数学的角度上，你可以找出来哪一个深度神经网络节点被激活了。但是我们不知道神经元应该是什么模型，我们也不知道这些神经单元层要共同做什么。所以无法解释结果是如何产生的。</p>
<p>另一方面，为了解释为什么算法这样选择，像决策树(<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2016/04/complete-tutorial-tree-based-modeling-scratch-in-python/?utm_source=dzone&utm_medium=social">decision trees</a>)这样机器学习算法给出了明确的规则，所以解释决策背后的推理是很容易的。因此，决策树和线性/<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2015/10/basics-logistic-regression/?utm_spurce=dzone&utm_medium=social">逻辑回归</a>这样的算法主要用于工业上的可解释性。</p>
<h2 id="机器学习和深度学习用于哪些领域？"><a href="#机器学习和深度学习用于哪些领域？" class="headerlink" title="机器学习和深度学习用于哪些领域？"></a><strong>机器学习和深度学习用于哪些领域？</strong></h2><p><a href="https://link.zhihu.com/?target=https://en.wikipedia.org/wiki/Machine_learning">维基百科上关于机器学习的文章</a>概述了所有使用机器学习的领域。这些包括：</p>
<ul>
<li><strong>计算机视觉</strong> 用于车牌识别和面部识别等的应用。</li>
<li><strong>信息检索</strong> 用于诸如搜索引擎的应用 - 包括文本搜索和图像搜索。</li>
<li><strong>市场营销</strong> 针对自动电子邮件营销和目标群体识别等的应用。</li>
<li><strong>医疗诊断</strong> 诸如癌症识别和异常检测等的应用。</li>
<li><strong>自然语言处理</strong>，如情绪分析和照片标记等的应用。</li>
</ul>
<p><img src="/.io//v2-a5d9583a42c4e50a047eb0769f284f89_720w.jpg" alt="img"><img src="/.io//v2-a5d9583a42c4e50a047eb0769f284f89_720w.jpg" alt="img"></p>
<p>上图恰当地总结了机器学习的应用领域，涵盖了整个机器智能的更广泛的话题。</p>
<p>使用机器学习/深度学习的公司的一个主要例子是<a href="https://link.zhihu.com/?target=https://www.forbes.com/forbes/welcome/?toURL=https://www.forbes.com/sites/bernardmarr/2017/08/08/the-amazing-ways-how-google-uses-deep-learning-ai/&refURL=https://www.google.co.in/&referrer=https://www.google.co.in/">Google</a>。</p>
<p><img src="/.io//v2-0be95d263c2c575a652c6bc5fb3e8ce8_720w.jpg" alt="img"><img src="/.io//v2-0be95d263c2c575a652c6bc5fb3e8ce8_720w.jpg" alt="img"></p>
<p>在上图中，你可以看到 Google 正在将机器学习应用于其各种产品。机器学习/深度学习的应用是无尽的 - 你仅需寻找正确的时机！</p>
<p><strong>突击测试</strong></p>
<p>为了评估你是否真的了解这个区别，我们将进行一次测验。 你可以在<a href="https://link.zhihu.com/?target=https://discuss.analyticsvidhya.com/t/discussion-for-pop-quiz/17271?u=jalfaizy">这个帖子</a>中发布你的答案。</p>
<p>请务必涉及以下步骤，以保证是完整的对各个场景进行回答。</p>
<ul>
<li>你将如何使用机器学习解决以下问题？</li>
<li>你如何使用深度学习解决以下问题？</li>
<li>结论：哪种方法是更好的？</li>
</ul>
<p>场景1</p>
<p>你必须建立一个用于自动驾驶车辆的软件组件。你构建的系统应该从相机中获取原始像素数据，并预测你应该引导车轮的角度是多少。</p>
<p>场景2</p>
<p>给定一个人的信用和背景信息，你的系统应该评估出此人是否应该有资格获得贷款。</p>
<p>场景3</p>
<p>你必须创建一个可以将俄语消息翻译成印地语消息的系统，以便俄语代表能够与当地的群众通信。</p>
<p>在<a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/04/comparison-between-deep-learning-machine-learning/?utm_source=dzone&utm_medium=social">此</a>找到针对上述问题的各种数据科学家的讨论记录和观点。</p>
<h2 id="未来发展趋势"><a href="#未来发展趋势" class="headerlink" title="未来发展趋势"></a><strong>未来发展趋势</strong></h2><p>本文概述了机器学习和深度学习及其差异。在本节中，我将分享我对机器学习和深度学习未来发展的观点。</p>
<ul>
<li>首先，随着业内对数据科学和机器学习使用的日益增长的趋势，对于每个想要生存下来的公司来说，重视机器学习将变得非常重要。苹果正在 <a href="https://link.zhihu.com/?target=https://www.analyticsvidhya.com/blog/2017/09/build-machine-learning-iphone-apple-coreml/?utm_source=dzone&utm_medium=social">iPhone X</a> 中使用机器学习，这标志着这项技术的发展方向。</li>
<li>深入学习让我们每天都感到惊讶，并将在不久的将来继续如此。这是因为深度学习是被证明为最先进的性能最好的技术之一。</li>
<li>针对机器学习和深度学习的研究将是持续的。但与前几年的研究仅限于学术界不同的是，机器学习和深度学习方面的研究将在业界和学术界都有爆发式的发展。而且拥有比以往更多的资助，更有可能成为人类整体发展的主旋律。</li>
</ul>
<p><strong>注</strong>：本文转载自开源中国，译文出处<a href="https://link.zhihu.com/?target=https://www.oschina.net/translate/deep-learning-vs-machine-learning?lang=chs&p=1">一文读懂深度学习与机器学习的差异</a>，英文原文<a href="https://link.zhihu.com/?target=https://dzone.com/articles/deep-learning-vs-machine-learning-the-hottest-topi">Deep Learning vs. Machine Learning</a>，<a href="https://link.zhihu.com/?target=https://my.oschina.net/tocy">Tocy</a>、 <a href="https://link.zhihu.com/?target=https://my.oschina.net/u/3635230">rever4433</a>、<a href="https://link.zhihu.com/?target=https://my.oschina.net/soaring">soaring</a>、<a href="https://link.zhihu.com/?target=https://my.oschina.net/u/2608597">mskf</a>等人参与翻译。做一只勤劳的IT干货搬运工，只为成就更好的你！</p>

                
            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="/about" rel="external nofollow noreferrer">胡耀文</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="https://hyw200199.github.io/2021/12/09/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%92%8C%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E6%9C%89%E4%BB%80%E4%B9%88%E5%8C%BA%E5%88%AB%EF%BC%9F-1/">https://hyw200199.github.io/2021/12/09/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E5%92%8C%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E6%9C%89%E4%BB%80%E4%B9%88%E5%8C%BA%E5%88%AB%EF%BC%9F-1/</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="/about" target="_blank">胡耀文</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0/">
                                    <span class="chip bg-color">深度学习</span>
                                </a>
                            
                                <a href="/tags/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/">
                                    <span class="chip bg-color">机器学习</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">
<div id="article-share">

    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
                <style>
    #reward {
        margin: 40px 0;
        text-align: center;
    }

    #reward .reward-link {
        font-size: 1.4rem;
        line-height: 38px;
    }

    #reward .btn-floating:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #rewardModal {
        width: 320px;
        height: 350px;
    }

    #rewardModal .reward-title {
        margin: 15px auto;
        padding-bottom: 5px;
    }

    #rewardModal .modal-content {
        padding: 10px;
    }

    #rewardModal .close {
        position: absolute;
        right: 15px;
        top: 15px;
        color: rgba(0, 0, 0, 0.5);
        font-size: 1.3rem;
        line-height: 20px;
        cursor: pointer;
    }

    #rewardModal .close:hover {
        color: #ef5350;
        transform: scale(1.3);
        -moz-transform:scale(1.3);
        -webkit-transform:scale(1.3);
        -o-transform:scale(1.3);
    }

    #rewardModal .reward-tabs {
        margin: 0 auto;
        width: 210px;
    }

    .reward-tabs .tabs {
        height: 38px;
        margin: 10px auto;
        padding-left: 0;
    }

    .reward-content ul {
        padding-left: 0 !important;
    }

    .reward-tabs .tabs .tab {
        height: 38px;
        line-height: 38px;
    }

    .reward-tabs .tab a {
        color: #fff;
        background-color: #ccc;
    }

    .reward-tabs .tab a:hover {
        background-color: #ccc;
        color: #fff;
    }

    .reward-tabs .wechat-tab .active {
        color: #fff !important;
        background-color: #22AB38 !important;
    }

    .reward-tabs .alipay-tab .active {
        color: #fff !important;
        background-color: #019FE8 !important;
    }

    .reward-tabs .reward-img {
        width: 210px;
        height: 210px;
    }
</style>

<div id="reward">
    <a href="#rewardModal" class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red">赏</a>

    <!-- Modal Structure -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <a class="close modal-close"><i class="fas fa-times"></i></a>
            <h4 class="reward-title">mua~</h4>
            <div class="reward-content">
                <div class="reward-tabs">
                    <ul class="tabs row">
                        <li class="tab col s6 alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                        <li class="tab col s6 wechat-tab waves-effect waves-light"><a href="#wechat">微 信</a></li>
                    </ul>
                    <div id="alipay">
                        <img src="/medias/reward/alipay.jpg" class="reward-img" alt="支付宝打赏二维码">
                    </div>
                    <div id="wechat">
                        <img src="/medias/reward/wechat.jpg" class="reward-img" alt="微信打赏二维码">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.tabs').tabs();
    });
</script>

            
        </div>
    </div>

    

    

    

    

    

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/2021/12/09/%E9%87%91%E7%A7%8D%E5%AD%90%E8%AE%BA%E6%96%87/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/9.jpg" class="responsive-img" alt="金种子论文">
                        
                        <span class="card-title">金种子论文</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2021-12-09
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E9%A1%B9%E7%9B%AE/" class="post-category">
                                    项目
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/%E9%87%91%E7%A7%8D%E5%AD%90/">
                        <span class="chip bg-color">金种子</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/2021/12/09/TCP%E5%8F%8AUDP%E7%9A%84%E7%89%B9%E6%80%A7/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/10.jpg" class="responsive-img" alt="TCP及UDP的特性">
                        
                        <span class="card-title">TCP及UDP的特性</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2021-12-09
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E5%85%AB%E8%82%A1%E6%96%87/" class="post-category">
                                    八股文
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/%E5%8D%8F%E8%AE%AE/">
                        <span class="chip bg-color">协议</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>



<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>


<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget card" style="background-color: white;">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            collapseDepth: Number('0'),
            headingSelector: 'h2, h3, h4'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h2, h3, h4').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>




    <footer class="page-footer bg-color">
    
        <link rel="stylesheet" href="/libs/aplayer/APlayer.min.css">
<style>
    .aplayer .aplayer-lrc p {
        
        display: none;
        
        font-size: 12px;
        font-weight: 700;
        line-height: 16px !important;
    }

    .aplayer .aplayer-lrc p.aplayer-lrc-current {
        
        display: none;
        
        font-size: 15px;
        color: #42b983;
    }

    
    .aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
        left: -66px !important;
    }

    .aplayer.aplayer-fixed.aplayer-narrow .aplayer-body:hover {
        left: 0px !important;
    }

    
</style>
<div class="">
    
    <div class="row">
        <meting-js class="col l8 offset-l2 m10 offset-m1 s12"
                   server="netease"
                   type="playlist"
                   id="503838841"
                   fixed='true'
                   autoplay='true'
                   theme='#42b983'
                   loop='all'
                   order='random'
                   preload='auto'
                   volume='0.7'
                   list-folded='true'
        >
        </meting-js>
    </div>
</div>

<script src="/libs/aplayer/APlayer.min.js"></script>
<script src="/libs/aplayer/Meting.min.js"></script>

    

    <div class="container row center-align"
         style="margin-bottom: 15px !important;">
        <div class="col s12 m8 l8 copy-right">
            Copyright&nbsp;&copy;
            
                <span id="year">2021</span>
            
            <a href="/about" target="_blank">胡耀文</a>
            |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
            |&nbsp;Theme&nbsp;<a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
            <br>
            
            
            
                
            
            
                <span id="busuanzi_container_site_pv">
                &nbsp;|&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;
                    <span id="busuanzi_value_site_pv" class="white-color"></span>
            </span>
            
            
                <span id="busuanzi_container_site_uv">
                &nbsp;|&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;
                    <span id="busuanzi_value_site_uv" class="white-color"></span>
            </span>
            
            <br>

            <!-- 运行天数提醒. -->
            
                <span id="sitetime"> Loading ...</span>
                <script>
                    var calcSiteTime = function () {
                        var seconds = 1000;
                        var minutes = seconds * 60;
                        var hours = minutes * 60;
                        var days = hours * 24;
                        var years = days * 365;
                        var today = new Date();
                        var startYear = "2021";
                        var startMonth = "0";
                        var startDate = "0";
                        var startHour = "0";
                        var startMinute = "0";
                        var startSecond = "0";
                        var todayYear = today.getFullYear();
                        var todayMonth = today.getMonth() + 1;
                        var todayDate = today.getDate();
                        var todayHour = today.getHours();
                        var todayMinute = today.getMinutes();
                        var todaySecond = today.getSeconds();
                        var t1 = Date.UTC(startYear, startMonth, startDate, startHour, startMinute, startSecond);
                        var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
                        var diff = t2 - t1;
                        var diffYears = Math.floor(diff / years);
                        var diffDays = Math.floor((diff / days) - diffYears * 365);

                        // 区分是否有年份.
                        var language = 'zh-CN';
                        if (startYear === String(todayYear)) {
                            document.getElementById("year").innerHTML = todayYear;
                            var daysTip = 'This site has been running for ' + diffDays + ' days';
                            if (language === 'zh-CN') {
                                daysTip = '本站已运行 ' + diffDays + ' 天';
                            } else if (language === 'zh-HK') {
                                daysTip = '本站已運行 ' + diffDays + ' 天';
                            }
                            document.getElementById("sitetime").innerHTML = daysTip;
                        } else {
                            document.getElementById("year").innerHTML = startYear + " - " + todayYear;
                            var yearsAndDaysTip = 'This site has been running for ' + diffYears + ' years and '
                                + diffDays + ' days';
                            if (language === 'zh-CN') {
                                yearsAndDaysTip = '本站已运行 ' + diffYears + ' 年 ' + diffDays + ' 天';
                            } else if (language === 'zh-HK') {
                                yearsAndDaysTip = '本站已運行 ' + diffYears + ' 年 ' + diffDays + ' 天';
                            }
                            document.getElementById("sitetime").innerHTML = yearsAndDaysTip;
                        }
                    }

                    calcSiteTime();
                </script>
            
            <br>
            
        </div>
        <div class="col s12 m4 l4 social-link social-statis">
    <a href="https://github.com/hyw200199" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:2372847321@qq.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>







    <a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=2372847321" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 2372847321" data-position="top" data-delay="50">
        <i class="fab fa-qq"></i>
    </a>







    <a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
        <i class="fas fa-rss"></i>
    </a>

</div>
    </div>
</footer>

<div class="progress-bar"></div>


    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script type="text/javascript">
$(function () {
    var searchFunc = function (path, search_id, content_id) {
        'use strict';
        $.ajax({
            url: path,
            dataType: "xml",
            success: function (xmlResponse) {
                // get the contents from search data
                var datas = $("entry", xmlResponse).map(function () {
                    return {
                        title: $("title", this).text(),
                        content: $("content", this).text(),
                        url: $("url", this).text()
                    };
                }).get();
                var $input = document.getElementById(search_id);
                var $resultContent = document.getElementById(content_id);
                $input.addEventListener('input', function () {
                    var str = '<ul class=\"search-result-list\">';
                    var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                    $resultContent.innerHTML = "";
                    if (this.value.trim().length <= 0) {
                        return;
                    }
                    // perform local searching
                    datas.forEach(function (data) {
                        var isMatch = true;
                        var data_title = data.title.trim().toLowerCase();
                        var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                        var data_url = data.url;
                        data_url = data_url.indexOf('/') === 0 ? data.url : '/' + data_url;
                        var index_title = -1;
                        var index_content = -1;
                        var first_occur = -1;
                        // only match artiles with not empty titles and contents
                        if (data_title !== '' && data_content !== '') {
                            keywords.forEach(function (keyword, i) {
                                index_title = data_title.indexOf(keyword);
                                index_content = data_content.indexOf(keyword);
                                if (index_title < 0 && index_content < 0) {
                                    isMatch = false;
                                } else {
                                    if (index_content < 0) {
                                        index_content = 0;
                                    }
                                    if (i === 0) {
                                        first_occur = index_content;
                                    }
                                }
                            });
                        }
                        // show search results
                        if (isMatch) {
                            str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                            var content = data.content.trim().replace(/<[^>]+>/g, "");
                            if (first_occur >= 0) {
                                // cut out 100 characters
                                var start = first_occur - 20;
                                var end = first_occur + 80;
                                if (start < 0) {
                                    start = 0;
                                }
                                if (start === 0) {
                                    end = 100;
                                }
                                if (end > content.length) {
                                    end = content.length;
                                }
                                var match_content = content.substr(start, end);
                                // highlight all keywords
                                keywords.forEach(function (keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    match_content = match_content.replace(regS, "<em class=\"search-keyword\">" + keyword + "</em>");
                                });

                                str += "<p class=\"search-result\">" + match_content + "...</p>"
                            }
                            str += "</li>";
                        }
                    });
                    str += "</ul>";
                    $resultContent.innerHTML = str;
                });
            }
        });
    };

    searchFunc('/search.xml', 'searchInput', 'searchResult');
});
</script>

    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>


    <script src="/libs/materialize/materialize.min.js"></script>
    <script src="/libs/masonry/masonry.pkgd.min.js"></script>
    <script src="/libs/aos/aos.js"></script>
    <script src="/libs/scrollprogress/scrollProgress.min.js"></script>
    <script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>

    

    
        
        <script type="text/javascript">
            // 只在桌面版网页启用特效
            var windowWidth = $(window).width();
            if (windowWidth > 768) {
                document.write('<script type="text/javascript" src="/libs/others/sakura.js"><\/script>');
            }
        </script>
    

    <!-- 雪花特效 -->
     
        <script type="text/javascript">
            // 只在桌面版网页启用特效
            var windowWidth = $(window).width();
            if (windowWidth > 768) {
                document.write('<script type="text/javascript" src="/libs/others/snow.js"><\/script>');
            }
        </script>
    

    <!-- 鼠标星星特效 -->
    

     
        <script src="https://ssl.captcha.qq.com/TCaptcha.js"></script>
        <script src="/libs/others/TencentCaptcha.js"></script>
        <button id="TencentCaptcha" data-appid="xxxxxxxxxx" data-cbfn="callback" type="button" hidden></button>
    

    <!-- Baidu Analytics -->

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    <script src="/libs/others/clicklove.js" async="async"></script>
    
    
    <script async src="/libs/others/busuanzi.pure.mini.js"></script>
    

    

    

    <!--腾讯兔小巢-->
    
    

    

    

    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    

</body>

</html>
